package com.stethodemo;

import android.app.Activity;
import android.app.Application;
import android.content.SharedPreferences;

import com.facebook.stetho.Stetho;

/**
 * Created by wom on 2015/9/1.
 */

public class MyApplication extends Application {

    SharedPreferences myPreferences;

    public void onCreate() {
        super.onCreate();

        Stetho.initialize(
                Stetho.newInitializerBuilder(this).enableDumpapp(
                        Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(
                                Stetho.defaultInspectorModulesProvider(this))
                        .build());

        sharedPreferencesTest();

    }

    private void sharedPreferencesTest() {

        myPreferences = getSharedPreferences("SharedPreferencesTest", Activity.MODE_APPEND);
        SharedPreferences.Editor editor = myPreferences.edit();
        editor.putInt("llll", 1111);
        editor.apply();
    }

}